%matplotlib inline
import matplotlib.pyplot as plt
import os
import requests
import s3fs
from osgeo import gdal
import xarray as xr
import hvplot.xarray
import holoviews as hvAccessing NetCDF4/HDF5 files from Earthdata Cloud
Summary
Harmonized Landsat Sentinel-2 (HLS) Operational Land Imager Surface Reflectance and TOA Brightness Daily Global 30m v2.0 (L30) (10.5067/HLS/HLSL30.002)
Requirements
AWS intance running in us-west 2
Earthdata Login
.netrc file
Learning Objectives
- S3 Access
Import Packages
Single File S3 Direct Access
Temporary Credentials
s3_cred_endpoint = {
'podaac':'https://archive.podaac.earthdata.nasa.gov/s3credentials',
'gesdisc': 'https://data.gesdisc.earthdata.nasa.gov/s3credentials',
'lpdaac':'https://data.lpdaac.earthdatacloud.nasa.gov/s3credentials',
'ornldaac': 'https://data.ornldaac.earthdata.nasa.gov/s3credentials',
'ghrcdaac': 'https://data.ghrc.earthdata.nasa.gov/s3credentials'
}def get_temp_creds(provider):
return requests.get(s3_cred_endpoint[provider]).json()temp_creds_req = get_temp_creds('podaac')
#temp_creds_reqs3_url = 's3://podaac-ops-cumulus-protected/ECCO_L4_SSH_05DEG_MONTHLY_V4R4/SEA_SURFACE_HEIGHT_mon_mean_2015-01_ECCO_V4r4_latlon_0p50deg.nc'fs_s3 = s3fs.S3FileSystem(anon=False,
key=temp_creds_req['accessKeyId'],
secret=temp_creds_req['secretAccessKey'],
token=temp_creds_req['sessionToken'])s3_file_obj = fs_s3.open(s3_url, mode='rb')ssh_ds = xr.open_dataset(s3_file_obj, engine='h5netcdf')
ssh_ds<xarray.Dataset>
Dimensions: (time: 1, latitude: 360, longitude: 720, nv: 2)
Coordinates:
* time (time) datetime64[ns] 2015-01-16T12:00:00
* latitude (latitude) float32 -89.75 -89.25 -88.75 ... 89.25 89.75
* longitude (longitude) float32 -179.8 -179.2 -178.8 ... 179.2 179.8
time_bnds (time, nv) datetime64[ns] 2015-01-01 2015-02-01
latitude_bnds (latitude, nv) float32 -90.0 -89.5 -89.5 ... 89.5 89.5 90.0
longitude_bnds (longitude, nv) float32 -180.0 -179.5 -179.5 ... 179.5 180.0
Dimensions without coordinates: nv
Data variables:
SSH (time, latitude, longitude) float32 ...
SSHIBC (time, latitude, longitude) float32 ...
SSHNOIBC (time, latitude, longitude) float32 ...
Attributes: (12/57)
acknowledgement: This research was carried out by the Jet Pr...
author: Ian Fenty and Ou Wang
cdm_data_type: Grid
comment: Fields provided on a regular lat-lon grid. ...
Conventions: CF-1.8, ACDD-1.3
coordinates_comment: Note: the global 'coordinates' attribute de...
... ...
time_coverage_duration: P1M
time_coverage_end: 2015-02-01T00:00:00
time_coverage_resolution: P1M
time_coverage_start: 2015-01-01T00:00:00
title: ECCO Sea Surface Height - Monthly Mean 0.5 ...
uuid: 088d03b8-4158-11eb-876b-0cc47a3f47f1xarray.Dataset
- time: 1
- latitude: 360
- longitude: 720
- nv: 2
- time(time)datetime64[ns]2015-01-16T12:00:00
- axis :
- T
- bounds :
- time_bnds
- coverage_content_type :
- coordinate
- long_name :
- center time of averaging period
- standard_name :
- time
array(['2015-01-16T12:00:00.000000000'], dtype='datetime64[ns]')
- latitude(latitude)float32-89.75 -89.25 ... 89.25 89.75
- axis :
- Y
- bounds :
- latitude_bnds
- comment :
- uniform grid spacing from -89.75 to 89.75 by 0.5
- coverage_content_type :
- coordinate
- long_name :
- latitude at grid cell center
- standard_name :
- latitude
- units :
- degrees_north
array([-89.75, -89.25, -88.75, ..., 88.75, 89.25, 89.75], dtype=float32)
- longitude(longitude)float32-179.8 -179.2 ... 179.2 179.8
- axis :
- X
- bounds :
- longitude_bnds
- comment :
- uniform grid spacing from -179.75 to 179.75 by 0.5
- coverage_content_type :
- coordinate
- long_name :
- longitude at grid cell center
- standard_name :
- longitude
- units :
- degrees_east
array([-179.75, -179.25, -178.75, ..., 178.75, 179.25, 179.75], dtype=float32) - time_bnds(time, nv)datetime64[ns]...
- comment :
- Start and end times of averaging period.
- coverage_content_type :
- coordinate
- long_name :
- time bounds of averaging period
array([['2015-01-01T00:00:00.000000000', '2015-02-01T00:00:00.000000000']], dtype='datetime64[ns]') - latitude_bnds(latitude, nv)float32...
- coverage_content_type :
- coordinate
- long_name :
- latitude bounds grid cells
array([[-90. , -89.5], [-89.5, -89. ], [-89. , -88.5], ..., [ 88.5, 89. ], [ 89. , 89.5], [ 89.5, 90. ]], dtype=float32) - longitude_bnds(longitude, nv)float32...
- coverage_content_type :
- coordinate
- long_name :
- longitude bounds grid cells
array([[-180. , -179.5], [-179.5, -179. ], [-179. , -178.5], ..., [ 178.5, 179. ], [ 179. , 179.5], [ 179.5, 180. ]], dtype=float32)
- SSH(time, latitude, longitude)float32...
- coverage_content_type :
- modelResult
- long_name :
- Dynamic sea surface height anomaly
- standard_name :
- sea_surface_height_above_geoid
- units :
- m
- comment :
- Dynamic sea surface height anomaly above the geoid, suitable for comparisons with altimetry sea surface height data products that apply the inverse barometer (IB) correction. Note: SSH is calculated by correcting model sea level anomaly ETAN for three effects: a) global mean steric sea level changes related to density changes in the Boussinesq volume-conserving model (Greatbatch correction, see sterGloH), b) the inverted barometer (IB) effect (see SSHIBC) and c) sea level displacement due to sea-ice and snow pressure loading (see sIceLoad). SSH can be compared with the similarly-named SSH variable in previous ECCO products that did not include atmospheric pressure loading (e.g., Version 4 Release 3). Use SSHNOIBC for comparisons with altimetry data products that do NOT apply the IB correction.
- valid_min :
- [-1.88057721]
- valid_max :
- [1.42077196]
[259200 values with dtype=float32]
- SSHIBC(time, latitude, longitude)float32...
- coverage_content_type :
- modelResult
- long_name :
- The inverted barometer (IB) correction to sea surface height due to atmospheric pressure loading
- units :
- m
- comment :
- Not an SSH itself, but a correction to model sea level anomaly (ETAN) required to account for the static part of sea surface displacement by atmosphere pressure loading: SSH = SSHNOIBC - SSHIBC. Note: Use SSH for model-data comparisons with altimetry data products that DO apply the IB correction and SSHNOIBC for comparisons with altimetry data products that do NOT apply the IB correction.
- valid_min :
- [-0.3014482]
- valid_max :
- [0.52456337]
[259200 values with dtype=float32]
- SSHNOIBC(time, latitude, longitude)float32...
- coverage_content_type :
- modelResult
- long_name :
- Sea surface height anomaly without the inverted barometer (IB) correction
- units :
- m
- comment :
- Sea surface height anomaly above the geoid without the inverse barometer (IB) correction, suitable for comparisons with altimetry sea surface height data products that do NOT apply the inverse barometer (IB) correction. Note: SSHNOIBC is calculated by correcting model sea level anomaly ETAN for two effects: a) global mean steric sea level changes related to density changes in the Boussinesq volume-conserving model (Greatbatch correction, see sterGloH), b) sea level displacement due to sea-ice and snow pressure loading (see sIceLoad). In ECCO Version 4 Release 4 the model is forced with atmospheric pressure loading. SSHNOIBC does not correct for the static part of the effect of atmosphere pressure loading on sea surface height (the so-called inverse barometer (IB) correction). Use SSH for comparisons with altimetry data products that DO apply the IB correction.
- valid_min :
- [-1.66542721]
- valid_max :
- [1.4550364]
[259200 values with dtype=float32]
- acknowledgement :
- This research was carried out by the Jet Propulsion Laboratory, managed by the California Institute of Technology under a contract with the National Aeronautics and Space Administration.
- author :
- Ian Fenty and Ou Wang
- cdm_data_type :
- Grid
- comment :
- Fields provided on a regular lat-lon grid. They have been mapped to the regular lat-lon grid from the original ECCO lat-lon-cap 90 (llc90) native model grid. SSH (dynamic sea surface height) = SSHNOIBC (dynamic sea surface without the inverse barometer correction) - SSHIBC (inverse barometer correction). The inverted barometer correction accounts for variations in sea surface height due to atmospheric pressure variations.
- Conventions :
- CF-1.8, ACDD-1.3
- coordinates_comment :
- Note: the global 'coordinates' attribute describes auxillary coordinates.
- creator_email :
- ecco-group@mit.edu
- creator_institution :
- NASA Jet Propulsion Laboratory (JPL)
- creator_name :
- ECCO Consortium
- creator_type :
- group
- creator_url :
- https://ecco-group.org
- date_created :
- 2020-12-18T09:39:51
- date_issued :
- 2020-12-18T09:39:51
- date_metadata_modified :
- 2021-03-15T22:07:49
- date_modified :
- 2021-03-15T22:07:49
- geospatial_bounds_crs :
- EPSG:4326
- geospatial_lat_max :
- [90.]
- geospatial_lat_min :
- [-90.]
- geospatial_lat_resolution :
- [0.5]
- geospatial_lat_units :
- degrees_north
- geospatial_lon_max :
- [180.]
- geospatial_lon_min :
- [-180.]
- geospatial_lon_resolution :
- [0.5]
- geospatial_lon_units :
- degrees_east
- history :
- Inaugural release of an ECCO Central Estimate solution to PO.DAAC
- id :
- 10.5067/ECG5M-SSH44
- institution :
- NASA Jet Propulsion Laboratory (JPL)
- instrument_vocabulary :
- GCMD instrument keywords
- keywords :
- EARTH SCIENCE > OCEANS > SEA SURFACE TOPOGRAPHY > SEA SURFACE HEIGHT, EARTH SCIENCE SERVICES > MODELS > EARTH SCIENCE REANALYSES/ASSIMILATION MODELS
- keywords_vocabulary :
- NASA Global Change Master Directory (GCMD) Science Keywords
- license :
- Public Domain
- metadata_link :
- https://cmr.earthdata.nasa.gov/search/collections.umm_json?ShortName=ECCO_L4_SSH_05DEG_MONTHLY_V4R4
- naming_authority :
- gov.nasa.jpl
- platform :
- ERS-1/2, TOPEX/Poseidon, Geosat Follow-On (GFO), ENVISAT, Jason-1, Jason-2, CryoSat-2, SARAL/AltiKa, Jason-3, AVHRR, Aquarius, SSM/I, SSMIS, GRACE, DTU17MDT, Argo, WOCE, GO-SHIP, MEOP, Ice Tethered Profilers (ITP)
- platform_vocabulary :
- GCMD platform keywords
- processing_level :
- L4
- product_name :
- SEA_SURFACE_HEIGHT_mon_mean_2015-01_ECCO_V4r4_latlon_0p50deg.nc
- product_time_coverage_end :
- 2018-01-01T00:00:00
- product_time_coverage_start :
- 1992-01-01T12:00:00
- product_version :
- Version 4, Release 4
- program :
- NASA Physical Oceanography, Cryosphere, Modeling, Analysis, and Prediction (MAP)
- project :
- Estimating the Circulation and Climate of the Ocean (ECCO)
- publisher_email :
- podaac@podaac.jpl.nasa.gov
- publisher_institution :
- PO.DAAC
- publisher_name :
- Physical Oceanography Distributed Active Archive Center (PO.DAAC)
- publisher_type :
- institution
- publisher_url :
- https://podaac.jpl.nasa.gov
- references :
- ECCO Consortium, Fukumori, I., Wang, O., Fenty, I., Forget, G., Heimbach, P., & Ponte, R. M. 2020. Synopsis of the ECCO Central Production Global Ocean and Sea-Ice State Estimate (Version 4 Release 4). doi:10.5281/zenodo.3765928
- source :
- The ECCO V4r4 state estimate was produced by fitting a free-running solution of the MITgcm (checkpoint 66g) to satellite and in situ observational data in a least squares sense using the adjoint method
- standard_name_vocabulary :
- NetCDF Climate and Forecast (CF) Metadata Convention
- summary :
- This dataset provides monthly-averaged dynamic sea surface height interpolated to a regular 0.5-degree grid from the ECCO Version 4 Release 4 (V4r4) ocean and sea-ice state estimate. Estimating the Circulation and Climate of the Ocean (ECCO) state estimates are dynamically and kinematically-consistent reconstructions of the three-dimensional, time-evolving ocean, sea-ice, and surface atmospheric states. ECCO V4r4 is a free-running solution of a global, nominally 1-degree configuration of the MIT general circulation model (MITgcm) that has been fit to observations in a least-squares sense. Observational data constraints used in V4r4 include sea surface height (SSH) from satellite altimeters [ERS-1/2, TOPEX/Poseidon, GFO, ENVISAT, Jason-1,2,3, CryoSat-2, and SARAL/AltiKa]; sea surface temperature (SST) from satellite radiometers [AVHRR], sea surface salinity (SSS) from the Aquarius satellite radiometer/scatterometer, ocean bottom pressure (OBP) from the GRACE satellite gravimeter; sea-ice concentration from satellite radiometers [SSM/I and SSMIS], and in-situ ocean temperature and salinity measured with conductivity-temperature-depth (CTD) sensors and expendable bathythermographs (XBTs) from several programs [e.g., WOCE, GO-SHIP, Argo, and others] and platforms [e.g., research vessels, gliders, moorings, ice-tethered profilers, and instrumented pinnipeds]. V4r4 covers the period 1992-01-01T12:00:00 to 2018-01-01T00:00:00.
- time_coverage_duration :
- P1M
- time_coverage_end :
- 2015-02-01T00:00:00
- time_coverage_resolution :
- P1M
- time_coverage_start :
- 2015-01-01T00:00:00
- title :
- ECCO Sea Surface Height - Monthly Mean 0.5 Degree (Version 4 Release 4)
- uuid :
- 088d03b8-4158-11eb-876b-0cc47a3f47f1
ssh_ds.SSH.hvplot.image(x='longitude', y='latitude', cmap='Spectral_r', aspect='equal')Unable to display output for mime type(s):